Skip to contentSkip to conversation

uml-patch-2.4.24-3

uml-devel Jeff Dike 7 participants 14 messages May 12, 2004 – May 18, 2004 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

This patch contains a ton of hostfs/humfs work.

The kernel infrastructure that was in hostfs_kern.c was made asynchronous, cleaned up, and many bugs fixed. It was also renamed to externfs. The old hostfs_user.c is now host_fs.c. Previously, there were a number of bugs conspiring to make hostfs completely synchronous, so you could read a file in, change it from the host, read it again, and see the new contents. This is now very likely not to work. If you depend on it, yell, and I'll see how to get it back. O_SYNC will make writes synchronous, and O_DIRECT (when this stuff makes it into my 2.6 tree) should do the same for writes, if it can be invoked from mount for an entire filesystem.

humfs is now able to accept plug-in metadata modules, thanks to Piotr Neuman. The existing shadow filesystem metadata is now plugged in to this interface, and lives in meta_fs.c. This will enable all the other metadata backends that people suggested earlier to be plugged in. Piotr is currently working on a tdb backend.

There was also a cleanup patch from Paul Wagland.

Everything in arch/um/fs/hostfs is now kernel code, and the USER_* stuff in the Makefile is now gone.

As for everything else, there were
a fix from Oleg which causes malloc to call vmalloc, which I changed
to check the allocation size and only use vmalloc for large allocations
a fix for a bug in mconsole_interrupt which would crash if it ever saw
an empty to-do list which cleaned up the code
a ethernet ioctl patch from Gerd Knorr
clean-up of the AIO support, which should now build and run on 2.4,
falling back to the IO thread if 2.6 AIO support isn't available
a filehandle abstraction to support reclaiming file descriptors
when we hit the kernel limit

Jeff

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw

hi jeff,
compiling a 2.4.26 with uml-patch-2.4.24-3 still seems to have the __cmpxchg issue.
see:
http://article.gmane.org/gmane.linux.uml.user/3806

i attached the mentioned patch and after that, it compiles cleanly for me.

regards
roland

----- Original Message -----
From: "Jeff Dike" <[email protected]>
To: <[email protected]>
Sent: Thursday, May 13, 2004 12:08 AM
Subject: [uml-devel] uml-patch-2.4.24-3

Quoted 38 lines

This patch contains a ton of hostfs/humfs work.

The kernel infrastructure that was in hostfs_kern.c was made asynchronous, cleaned up, and many bugs fixed. It was also renamed to externfs. The old hostfs_user.c is now host_fs.c. Previously, there were a number of bugs conspiring to make hostfs completely synchronous, so you could read a file in, change it from the host, read it again, and see the new contents. This is now very likely not to work. If you depend on it, yell, and I'll see how to get it back. O_SYNC will make writes synchronous, and O_DIRECT (when this stuff makes it into my 2.6 tree) should do the same for writes, if it can be invoked from mount for an entire filesystem.

humfs is now able to accept plug-in metadata modules, thanks to Piotr Neuman. The existing shadow filesystem metadata is now plugged in to this interface, and lives in meta_fs.c. This will enable all the other metadata backends that people suggested earlier to be plugged in. Piotr is currently working on a tdb backend.

There was also a cleanup patch from Paul Wagland.

Everything in arch/um/fs/hostfs is now kernel code, and the USER_* stuff in the Makefile is now gone.

As for everything else, there were
a fix from Oleg which causes malloc to call vmalloc, which I changed to check the allocation size and only use vmalloc for large allocations a fix for a bug in mconsole_interrupt which would crash if it ever saw an empty to-do list which cleaned up the code
a ethernet ioctl patch from Gerd Knorr
clean-up of the AIO support, which should now build and run on 2.4, falling back to the IO thread if 2.6 AIO support isn't available a filehandle abstraction to support reclaiming file descriptors when we hit the kernel limit

Jeff

Quoted 10 lines

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw
Quoted 7 lines · roland

hi jeff, compiling a 2.4.26 with uml-patch-2.4.24-3 still seems to have the __cmpxchg issue.
see:
http://article.gmane.org/gmane.linux.uml.user/3806

i attached the mentioned patch and after that, it compiles cleanly for me.

Well, notice that its still UML 2.4.->24<- ;)
If the releases will be for a newer kernel, the patch will be included.

Regards,
Sven

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#3 lore raw
Quoted 3 lines

Well, notice that its still UML 2.4.->24<- ;)
If the releases will be for a newer kernel, the patch will be included.

ok - seems you`re right :)

----- Original Message -----
From: "Sven 'Darkman' Michels" <[email protected]>
To: <[email protected]>
Sent: Thursday, May 13, 2004 2:14 AM
Subject: Re: [uml-devel] uml-patch-2.4.24-3

Quoted 19 lines
Quoted 8 lines · roland

hi jeff,
compiling a 2.4.26 with uml-patch-2.4.24-3 still seems to have the __cmpxchg issue.
see:
http://article.gmane.org/gmane.linux.uml.user/3806

i attached the mentioned patch and after that, it compiles cleanly for me.

Well, notice that its still UML 2.4.->24<- ;)
If the releases will be for a newer kernel, the patch will be included.

Regards,
Sven

Quoted 10 lines

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#4 lore raw
In reply to Jeff Dike
Quoted 7 lines · Jeff Dike

This patch contains a ton of hostfs/humfs work.

The kernel infrastructure that was in hostfs_kern.c was made asynchronous, cleaned up, and many bugs fixed. It was also renamed to externfs. The old hostfs_user.c is now host_fs.c. Previously, there were a number of bugs
conspiring to make hostfs completely synchronous, so you could read a file
in, change it from the host, read it again, and see the new contents. This
is now very likely not to work.

I wonder based on what you say here if two UMLs that hostfs mount the same directory and access the same file...one for reading, and the other for writing, if the first will see the updates written by the second....or maybe I am misinterpretting.

??

thanks, Giovanni

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

author
#5 lore raw
Quoted 4 lines · [email protected] said:

I wonder based on what you say here if two UMLs that hostfs mount the same directory and access the same file...one for reading, and the other for writing, if the first will see the updates written by the second....or maybe I am misinterpretting.

You are correct, the writer will cache the new data, and the reader won't see it until it's flushed out somehow. If you can arrange to have the writer sync the filesystem before the reader reads the files, then it will get up-to-date information.

Otherwise, if this is a problem, we need to make hostfs optionally synchronous.

Jeff

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#6 lore raw
Quoted 8 lines · Jeff Dike
Quoted 4 lines · [email protected] said:

I wonder based on what you say here if two UMLs that hostfs mount the same directory and access the same file...one for reading, and the other for writing, if the first will see the updates written by the second....or maybe I am misinterpretting.

Quoted 4 lines

You are correct, the writer will cache the new data, and the reader won't see
it until it's flushed out somehow. If you can arrange to have the writer sync the filesystem before the reader reads the files, then it will get up-to-date information.

Otherwise, if this is a problem, we need to make hostfs optionally synchronous.

Yes - I think there is value in that.

On a different but related topic. I am trying the 2.4.24-2 patch to see if it helps with the kernel panics I posted about in a previous thread but I am now seeing some odd failures with hostfs. Granted my seetup is a bit odd (i.e., atypical).

I am mounting Clearcase vobs using view extended pathnames. I have a little script that mounts a whole series of Clearcase vobs...after the script some are mounted and some are not...Clearcase implements these view extended pathnames as a virtual filsystem (mvfs) and there must be something about that which makes the mounting fail occasionally...mouinting other host filesystems works as before. note: mounting the CC mvfs vobs worked in 2.4.24-1 with no problem.

I will try again with 2.4.24-3 (w/ fsync - hopefully I can find the right place(s)) and report on that...

regards, GSM

Quoted 4 lines

Jeff

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#7 lore raw

[uml-devel] 2.4.24-2 UML problems with hostfs ClearCase mounts [ was Re: [uml-devel] uml-patch-2.4.24-3]

A little more data on this one - the behaviour I see with these mounts is that

mount -t hostfs none /mnt/mybob -o /view/myview/vob/myvob

succeeds but mounts the hosts / dir instead of the desired view extended pathname of the ClearCase vob.

very strange - 2.4.24-1 patch seems to work fine with these Clearcase host filesystems.

I tries with 2.4.24-3 but did not even get it too boot but this is likely some other issue.

regards, GSM

Quoted 19 lines · Joe Marzot
Quoted 9 lines · Jeff Dike
Quoted 4 lines · [email protected] said:

I wonder based on what you say here if two UMLs that hostfs mount the same directory and access the same file...one for reading, and the other for writing, if the first will see the updates written by the second....or maybe I am misinterpretting.

Quoted 4 lines

You are correct, the writer will cache the new data, and the reader won't see
it until it's flushed out somehow. If you can arrange to have the writer sync the filesystem before the reader reads the files, then it will get up-to-date information.

Otherwise, if this is a problem, we need to make hostfs optionally synchronous.

Yes - I think there is value in that.

Quoted 15 lines

On a different but related topic. I am trying the 2.4.24-2 patch to see if it helps with the kernel panics I posted about in a previous thread but I am now seeing some odd failures with hostfs. Granted my seetup is a bit odd (i.e., atypical).

I am mounting Clearcase vobs using view extended pathnames. I have a little script that mounts a whole series of Clearcase vobs...after the script some are mounted and some are not...Clearcase implements these view extended pathnames as a virtual filsystem (mvfs) and there must be something about that which makes the mounting fail occasionally...mouinting other host filesystems works as before. note: mounting the CC mvfs vobs worked in 2.4.24-1 with no problem.

I will try again with 2.4.24-3 (w/ fsync - hopefully I can find the right place(s)) and report on that...

regards, GSM

Quoted 4 lines

Jeff

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#8 lore raw

Re: [uml-devel] 2.4.24-2 UML problems with hostfs ClearCase mounts

Quoted 7 lines · Joe Marzot

A little more data on this one - the behaviour I see with these mounts is that

mount -t hostfs none /mnt/mybob -o /view/myview/vob/myvob

succeeds but mounts the hosts / dir instead of the desired view extended pathname of the ClearCase vob.

This is a known bug in 2.4.24-2. A patch can be found in the archives or from http://marasystems.com/download/uml/

If you need hostfs then you should probably stick to 2.4.24-1 for the time being. Jeff is doing some heavy restructuring of the uml host file access methods while adding the humfs and as a result of this the hostfs support has become very unstable while the combined supporting framework for humfs and hostfs is taking shape. Hopefully this will soon result in a much better hostfs than before, but at the moment things is a bit shaky..

Regards
Henrik

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#9 lore raw

[uml-devel] how to do programming in UML

Hi,
The root_fs, I am using for uml, does not contain gcc.

Is it possible to compile a program using host machine's gcc and
libraries?
If yes, how can I do it?

Thanks,
Pronoy

Quoted 36 lines · Henrik Nordstrom
Quoted 7 lines · Joe Marzot

A little more data on this one - the behaviour I see with these mounts is that

mount -t hostfs none /mnt/mybob -o /view/myview/vob/myvob

succeeds but mounts the hosts / dir instead of the desired view extended pathname of the ClearCase vob.

This is a known bug in 2.4.24-2. A patch can be found in the archives or from http://marasystems.com/download/uml/

If you need hostfs then you should probably stick to 2.4.24-1 for the time
being. Jeff is doing some heavy restructuring of the uml host file access
methods while adding the humfs and as a result of this the hostfs support
has become very unstable while the combined supporting framework for humfs
and hostfs is taking shape. Hopefully this will soon result in a much better hostfs than before, but at the moment things is a bit shaky..

Regards
Henrik

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#10 lore raw

Re: [uml-devel] how to do programming in UML

hi!

Quoted 1 line

The root_fs, I am using for uml, does not contain gcc.

you can install gcc inside your uml!

Quoted 1 line

Is it possible to compile a program using host machine's gcc and libraries?

you mean, you want to use the host machinse gcc and libraries inside uml? (by hosfs mount or whatever?)
no - i wouldn`t recommend that.
you can compile your stuff outside your uml on the host itself and transfer the binaries to the uml afterwards - you just need to make sure that your host and your uml(root_fs) OS-version dont differ too much - otherwise you will get problems with library dependency (thats just the same issue as if you compile on a redhat 9 and transfer the binaries to a suse 6.4 :)

Quoted 1 line

If yes, how can I do it?

just as usual?
configurer
make
make install.....

regards
roland

----- Original Message -----
From: pronoy debnath
Cc: [email protected]
Sent: Tuesday, May 18, 2004 6:54 AM
Subject: [uml-devel] how to do programming in UML

Hi,
The root_fs, I am using for uml, does not contain gcc.

Is it possible to compile a program using host machine's gcc and libraries? If yes, how can I do it?

Thanks,
Pronoy

Henrik Nordstrom wrote:

On Mon, 17 May 2004, Joe Marzot wrote:

A little more data on this one - the behaviour I see with these mounts
is that

mount -t hostfs none /mnt/mybob -o /view/myview/vob/myvob

succeeds but mounts the hosts / dir instead of the desired view extended pathname of the ClearCase vob.

This is a known bug in 2.4.24-2. A patch can be found in the archives or from http://marasystems.com/download/uml/

If you need hostfs then you should probably stick to 2.4.24-1 for the time being. Jeff is doing some heavy restructuring of the uml host file access methods while adding the humfs and as a result of this the hostfs support has become very unstable while the combined supporting framework for humfs and hostfs is taking shape. Hopefully this will soon result in a much better hostfs than before, but at the moment things is a bit shaky..

Regards
Henrik

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#11 lore raw

Re: [uml-devel] 2.4.24-2 UML problems with hostfs ClearCase mounts

In reply to Henrik Nordstrom

Thank you so much for the reply - For the most part existing hostfs support has been fine for me (I need the sync behaviour).

However with 2.4.24-1 I am still getting kernel panic crashes and it looked like some crashes were handled in 2.4.24-2. I will try to pick through the 2.4.24-2 patch and take just the not hostfs parts.

I do have loads of cores if anyone is interested since I hacked the panic code to abort() as I was not catching these intermittent crashes very often.

regards, Giovanni

Quoted 12 lines · Henrik Nordstrom
Quoted 5 lines · Joe Marzot

A little more data on this one - the behaviour I see with these mounts is that

mount -t hostfs none /mnt/mybob -o /view/myview/vob/myvob

succeeds but mounts the hosts / dir instead of the desired view extended pathname of the ClearCase vob.

This is a known bug in 2.4.24-2. A patch can be found in the archives or from http://marasystems.com/download/uml/

Quoted 10 lines

If you need hostfs then you should probably stick to 2.4.24-1 for the time
being. Jeff is doing some heavy restructuring of the uml host file access
methods while adding the humfs and as a result of this the hostfs support
has become very unstable while the combined supporting framework for humfs
and hostfs is taking shape. Hopefully this will soon result in a much better hostfs than before, but at the moment things is a bit shaky..

Regards
Henrik

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#12 lore raw

Re: [uml-devel] 2.4.24-2 UML problems with hostfs ClearCase mounts

Quoted 6 lines · Joe Marzot

Thank you so much for the reply - For the most part existing hostfs support has been fine for me (I need the sync behaviour).

However with 2.4.24-1 I am still getting kernel panic crashes and it looked like some crashes were handled in 2.4.24-2. I will try to pick through the 2.4.24-2 patch and take just the not hostfs parts.

Pathes making hostfs usable in both 2.4.24-2 and 2.4.26-1 is available from http://marasystems.com/download/

Quoted 3 lines

I do have loads of cores if anyone is interested since I hacked the panic code to abort() as I was not catching these intermittent crashes very often.

stack traces of the panics is more interesting (extract from the core using gdb and the exact binary the core was generated from).. even more so if you find a common pattern and have some suspicion on how/when it may occur.

Regards
Henrik

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

author
#13 lore raw

Re: [uml-devel] 2.4.24-2 UML problems with hostfs ClearCase mounts

In reply to Joe Marzot
Quoted 2 lines · Joe Marzot

Thank you so much for the reply - For the most part existing hostfs support has been fine for me (I need the sync behaviour).

Enough people do that I will add a synchronous option which restores the old behavior.

Quoted 3 lines

I do have loads of cores if anyone is interested since I hacked the panic code to abort() as I was not catching these intermittent crashes very often.

For starters, backtraces would be good.

Jeff

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel